package com.erp.module.ProjectOrderProcess

import android.content.Intent
import android.view.View
import com.erp.R
import com.erp.module.ProjectOrderProcess.ProjectOrderProcessCreate.ProjectOrderProcessActivity
import com.erp.module.packPiece.PackPieceContract
import com.erp.myFragment.BaseKFragment
import com.erp.view.PullToRefreshView
import kotlinx.android.synthetic.main.fragment_project_order_process.*

class FragmentProjectOrderProcess : BaseKFragment(), View.OnClickListener {


    override fun getLayoutId(): Int {
        return R.layout.fragment_project_order_process
    }

    override fun initData() {
        btKailiao.setOnClickListener(this)
        btFengbian.setOnClickListener(this)
        btDakong.setOnClickListener(this)
        btFenbao.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when(v){
            btKailiao -> {
                showActivity(1)
            }
            btFengbian -> {
                showActivity(2)
            }
            btDakong -> {
                showActivity(3)
            }
            btFenbao -> {
                showActivity(4)
            }
        }
    }

    fun showActivity( code : Int){
        val i = Intent(activity, ProjectOrderProcessActivity:: class.java)
        i.putExtra("code",code)
        startActivity(i)
    }
}